import { MlcEnum } from './enum'

export class ShopCart {
	isSale?: boolean;
	count?: number;
	goodsId?: string;
	img?: string;
	unit?: string;
	unitPrice?:number;
	selected?: boolean;

}

export interface ISubmitOrderResult{
	orderId: string;
	expire: number;
	amount: number;
	shopCarRemoveCount: number;
	package: string;
	nonceStr: string;
	timeStamp: string;
	appId: string;
	signType: string;
	paySign: string;
	payCode?:string; // 测试环境是返回
}

export class OrderListItem {
	id?: string;
	status?: MlcEnum.OrderStauts;
	amount?: number;
	goodsCount?: number;
	goodsDesc?: string;
	goodsImgs?: string | string[];
	expire?: number;

	isImgsArry?:boolean;
	statusStr?:string;
}

export class OrderDetail {
	id?: string;
	status?: number;
	orderNumber?: string;
	createTime?: string;
	payMode?: string;
	invoice?: {
		title: string,
		type: string,
		content: string,
		consignee?: {
			name?: string,
			phone?: string,
			address?: string,
			areas: string[],
		},
	};
	consignee?: {
		name?: string,
		phone?: string,
		address?: string,
		areas: string[],
	};
	goodsAmount?: number;
	freightAmount?: number;
	amount?: number;
	goodsInfo?: {
		img?: string,
		name?: string,
		count?: number,
		desc?: string,
		standardId?: string,
		goodsId?: string,
		unitPrice?: number
	}[];
	expire?:number;
}